---
sidebar_label: '@roots/bud-purgecss'
---

# @roots/bud-purgecss

[PurgeCSS](https://purgecss.com/) support can be added by installing the [@roots/bud-purgecss](/extensions/bud-purgecss) extension.

## Installation

```sh npm2yarn
npm install @roots/bud-purgecss --save-dev
```

[purgecss-with-wordpress](https://purgecss.com/guides/wordpress.html) is optional but recommended when working with WordPress.

```sh npm2yarn
npm install @roots/bud-purgecss purgecss-with-wordpress --save-dev
```

## Configuration

```ts title="bud.config.js"
import purgeCssWordPress from `purgecss-with-wordpress`

bud.purgecss({
  content: [bud.path(`resources/views/**`)],
  safelist: [...purgeCssWordPress.safelist],
})
```
